﻿using DFGK_WMS.Model.Models;
using DFGK_WMS.WebAPI.Tools;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;

namespace DFGK_WMS.IRepository
{
    public interface ITPutawayOrderRepository: IBaseRepository<TPutawayOrder>
    {
        /// <summary>
        /// 查询任务管理
        /// </summary>
        /// <param name="code"></param>
        /// <returns></returns>
        TPutawayOrder Getputawayorder(Expression<Func<TPutawayOrder, bool>> where);

        /// <summary>
        /// 修改任务状态
        /// </summary>
        /// <param name="order"></param>
        /// <returns></returns>
        bool UpdatePutawayorder(TPutawayOrder order);
        /// <summary>
        /// 出库单查询
        /// </summary>
        /// <param name="RelatedOrderDetailId"></param>
        /// <returns></returns>
        TShippingOrderDetail GetShippingLock(int? RelatedOrderDetailId);
        /// <summary>
        /// 托盘物料信息
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        List<PalletMsg> GetPalletmsg(int ids,out string message);

        /// <summary>
        /// 入库
        /// </summary>
        /// <param name="putwarorder"></param>
        /// <param name="errorMsg"></param>
        /// <returns></returns>
        bool ExecInstructFinished(TPutawayOrder putwarorder, out string errorMsg);

        /// <summary>
        /// 出库
        /// </summary>
        /// <param name="putwarorder"></param>
        /// <param name="message"></param>
        /// <returns></returns>
        bool HandleUnbindOfOutstorageEnd(TPutawayOrder putwarorder, out string message);

        /// <summary>
        /// 移库
        /// </summary>
        /// <param name="putwarorder"></param>
        /// <param name="message"></param>
        /// <returns></returns>
        bool CompleteTransferBinOrders(TPutawayOrder putwarorder, out string message);

        /// <summary>
        /// 模式查询
        /// </summary>
        /// <returns></returns>
        TStation GetLinemodel();
        /// <summary>
        /// 模式修改
        /// </summary>
        /// <param name="type"></param>
        /// <returns></returns>

        bool UpdateStationsLine(string type);
    }
}
